//
//  YHResponseTip.h
//  YHBaseProject
//
//  Created by yuhang liu on 2022/11/18.
//  Copyright © 2022 lyh. All rights reserved.
//

#import <Foundation/Foundation.h>

NS_ASSUME_NONNULL_BEGIN

/// 响应结果
UIKIT_EXTERN NSString *const kResponseBody;
/// 响应错误
UIKIT_EXTERN NSString *const kErrorDesc;
/// 无网络
UIKIT_EXTERN NSString *const kNoNetworkErrorDescStr;
/// 重复请求
UIKIT_EXTERN NSString *const kSameRequestErrorDescStr;
/// 返回数据错误
UIKIT_EXTERN NSString *const kResultDataErrorDescStr;
/// 接口返回成功code
UIKIT_EXTERN NSString *const kResultCodeSuccessStr;
/// 接口返回失败code
UIKIT_EXTERN NSString *const kResultCodeErrorStr;


@interface XMResponseTip : NSObject

/// 返回码
@property (nonatomic, copy) NSString *code;
/// 信息描述
@property (nonatomic, copy) NSString *message;
/// 状态
@property (nonatomic, assign, getter=isSuccess) BOOL success;

#pragma mark - 分页

/// 是否可以加载更多
@property (nonatomic, assign) BOOL loadMore;
/// 上次列表数据标识
@property (nonatomic, copy) NSString *prevIndex;

/// 设置错误返回码、信息描述
- (void)setupVerifyInfoWithcode:(NSString *)code errorDesc:(NSString *)errorDesc;

/// 每次请求的公用回调
//+ (void)callbackWithCompleteBlock:(void (^)(void))completeBlock;

@end

NS_ASSUME_NONNULL_END
